import mongoose from 'mongoose';

const ThemeBookSchema = new mongoose.Schema(
  {
    theme: { type: mongoose.Schema.Types.ObjectId, ref: 'Theme' }, // 主题
    book: { type: mongoose.Schema.Types.ObjectId, ref: 'Book' }, // 书籍
    priority: Number, // 显示优先级
    create_time: Date
  },
  { versionKey: false }
);

const ThemeBook = mongoose.model('ThemeBook', ThemeBookSchema);

export { ThemeBook };
